home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 1.iso / toolbox / documents / OpenGL / extensions / spec / texture_edge_clamp.spec < prev    next >
Encoding:
Text File  |  1996-11-11  |  5.3 KB  |  176 lines

  1. Name
  2.  
  3.     SGIS_texture_edge_clamp
  4.  
  5. Name Strings
  6.  
  7.     GL_SGIS_texture_edge_clamp
  8.  
  9. Version
  10.  
  11.     $Date: 1995/09/30 02:33:09 $ $Revision: 1.1 $
  12.  
  13. Number
  14.  
  15.     35
  16.  
  17. Dependencies
  18.  
  19.     EXT_texture3D affects the definition of this extension
  20.     SGIS_texture_filter4 affects the definition of this extension
  21.  
  22. Overview
  23.  
  24.     The base OpenGL provides clamping such that the texture coordinates are
  25.     limited to exactly the range [0,1].  When a texture coordinate is
  26.     clamped using this algorithm, the texture sampling filter straddles the
  27.     edge of the texture image, taking 1/2 its sample values from within the
  28.     texture image, and the other 1/2 from the texture border.  It is
  29.     sometimes desirable to clamp a texture without requiring a border, and
  30.     without using the constant border color.
  31.  
  32.     This extension defines a new texture clamping algorithm.
  33.     CLAMP_TO_EDGE_SGIS clamps texture coordinates at all mipmap levels such
  34.     that the texture filter never samples a border texel.  When used with a
  35.     NEAREST or a LINEAR filter, the color returned when clamping is derived
  36.     only from texels at the edge of the texture image.  When used with
  37.     FILTER4 filters, the filter operations of CLAMP_TO_EDGE_SGIS are defined
  38.     but don't result in a nice clamp-to-edge color.
  39.  
  40.     CLAMP_TO_EDGE_SGIS is supported by 1, 2, and 3-dimensional textures
  41.     only.
  42.  
  43. Issues
  44.  
  45.     *   Is the arithmetic for FILTER4 filters correct?  Is this the right
  46.     thing to do?
  47.  
  48. New Procedures and Functions
  49.  
  50.     None
  51.  
  52. New Tokens
  53.  
  54.     Accepted by the <param> parameter of TexParameteri and TexParameterf,
  55.     and by the <params> parameter of TexParameteriv and TexParameterfv, when
  56.     their <pname> parameter is TEXTURE_WRAP_S, TEXTURE_WRAP_T, or
  57.     TEXTURE_WRAP_R_EXT:
  58.  
  59.     CLAMP_TO_EDGE_SGIS
  60.  
  61. Additions to Chapter 2 of the 1.0 Specification (OpenGL Operation)
  62.  
  63.     None
  64.  
  65. Additions to Chapter 3 of the 1.0 Specification (Rasterization)
  66.  
  67.     GL Specification Table 3.7 is updated as follows:
  68.  
  69.     Name                Type        Legal Values
  70.     ----                ----        ------------
  71.     TEXTURE_WRAP_S            integer        CLAMP, REPEAT,
  72.                             CLAMP_TO_EDGE_SGIS
  73.     TEXTURE_WRAP_T            integer        CLAMP, REPEAT,
  74.                             CLAMP_TO_EDGE_SGIS
  75.     TEXTURE_WRAP_R_EXT        integer        CLAMP, REPEAT,
  76.                             CLAMP_TO_EDGE_SGIS
  77.     TEXTURE_MIN_FILTER        integer        NEAREST, LINEAR,
  78.                             NEAREST_MIPMAP_NEAREST,
  79.                             NEAREST_MIPMAP_LINEAR,
  80.                             LINEAR_MIPMAP_NEAREST,
  81.                             LINEAR_MIPMAP_LINEAR,
  82.                             FILTER4_SGIS,
  83.                             LINEAR_CLIPMAP_LINEAR_SGIX
  84.     TEXTURE_MAG_FILTER        integer        NEAREST, LINEAR,
  85.                             FILTER4_SGIS,
  86.                             LINEAR_DETAIL_SGIS,
  87.                             LINEAR_DETAIL_ALPHA_SGIS,
  88.                             LINEAR_DETAIL_COLOR_SGIS,
  89.                             LINEAR_SHARPEN_SGIS,
  90.                             LINEAR_SHARPEN_ALPHA_SGIS,
  91.                             LINEAR_SHARPEN_COLOR_SGIS,
  92.                             LINEAR_LEQUAL_R_SGIS,
  93.                             LINEAR_GEQUAL_R_SGIS
  94.     TEXTURE_BORDER_COLOR        4 floats    any 4 values in [0,1]
  95.     DETAIL_TEXTURE_LEVEL_SGIS    integer        any non-negative integer
  96.     DETAIL_TEXTURE_MODE_SGIS    integer        ADD, MODULATE
  97.     TEXTURE_MIN_LOD_SGIS        float        any value
  98.     TEXTURE_MAX_LOD_SGIS        float        any value
  99.     TEXTURE_BASE_LEVEL_SGIS        integer        any non-negative integer
  100.     TEXTURE_MAX_LEVEL_SGIS        integer        any non-negative integer
  101.     GENERATE_MIPMAP_SGIS        boolean        TRUE or FALSE
  102.     TEXTURE_CLIPMAP_OFFSET_SGIX    2 floats    any 2 values
  103.  
  104.     Table 3.7: Texture parameters and their values.
  105.  
  106.     CLAMP_TO_EDGE_SGIS texture clamping is specified by calling
  107.     TexParameteri with <target> set to TEXTURE_1D, TEXTURE_2D, or
  108.     TEXTURE_3D_EXT, <pname> set to TEXTURE_WRAP_S, TEXTURE_WRAP_T,
  109.     or TEXTURE_WRAP_R_EXT, and <param> set to CLAMP_TO_EDGE_SGIS.
  110.  
  111.     Let [min,max] be the range of a clamped texture coordinate, and let N
  112.     be the size of the 1D, 2D, or 3D texture image in the direction of
  113.     clamping.  Then in all cases
  114.  
  115.     max = 1 - min
  116.  
  117.     because the clamping is always symmetric about the [0,1] mapped range of
  118.     a texture coordinate.  When used with NEAREST or LINEAR filters,
  119.     CLAMP_TO_EDGE_SGIS defines a minimum clamping value of
  120.  
  121.     min = 1 / 2*N
  122.  
  123.     When used with FILTER4 filters, CLAMP_TO_EDGE_SGIS defines a minimum
  124.     clamping value of
  125.  
  126.     min = 3 / 2*N,        N > 2
  127.  
  128.     min = 1/2        N <= 2
  129.  
  130. Additions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations
  131. and the Framebuffer)
  132.  
  133.     None
  134.  
  135. Additions to Chapter 5 of the 1.0 Specification (Special Functions)
  136.  
  137.     None
  138.  
  139. Additions to Chapter 6 of the 1.0 Specification (State and State Requests)
  140.  
  141.     None
  142.  
  143. Additions to the GLX Specification
  144.  
  145.     None
  146.  
  147. Dependencies on EXT_texture3D
  148.  
  149.     If EXT_texture3D is not implemented, then the references clamping of 3D
  150.     textures in this file are invalid, and references to TEXTURE_WRAP_R_EXT
  151.     should be ignored.
  152.  
  153. Dependencies on SGIS_texture_filter4
  154.  
  155.     If SGIS_texture_filter4 is not implemented, then discussions about the
  156.     interaction of filter4 texture filters and the clamping function
  157.     described in this file are invalid, and should be ignored.
  158.  
  159. Errors
  160.  
  161.     None
  162.  
  163. New State
  164.  
  165.     Only the type information changes for these parameters:
  166.  
  167.     Get Value        Get Command        Type    Initial Value    Attrib
  168.     ---------        -----------        ----    -------------    ------
  169.     TEXTURE_WRAP_S    GetTexParameteriv    n x Z3    REPEAT        texture
  170.     TEXTURE_WRAP_T    GetTexParameteriv    n x Z3    REPEAT        texture
  171.     TEXTURE_WRAP_R_EXT    GetTexParameteriv    n x Z3    REPEAT        texture
  172.  
  173. New Implementation Dependent State
  174.  
  175.     None
  176.